deploy: Clean up leftover state before creating new directories
authorColin Walters <walters@verbum.org>
Thu, 10 Jul 2014 19:19:50 +0000 (15:19 -0400)
committerColin Walters <walters@verbum.org>
Sat, 13 Sep 2014 14:43:14 +0000 (10:43 -0400)
commit12e3ed83d3ab7dc8077872f1319a4d7deb0ae81f
treec8ba174554f3474957f8b3451f169e3e90f5d336
parent7b01bd2e4333d4346dd08e0b5caf672f56b1ccfd
deploy: Clean up leftover state before creating new directories

This fixes a regression introduced with https://git.gnome.org/browse/ostree/commit/?id=7baa600e237b326899de2899a9bc54a6b863943c

The original code in "ostree admin upgrade" had a comment:

 /* Here we perform cleanup of any leftover data from previous
  * partial failures. This avoids having to call gs_shutil_rm_rf()
  * at random points throughout the process. */

But since I deleted that initial cleanup call, we *do* need to do the
cleanup during the process run.  It turns out there are only a few
places this is necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=733030
src/libostree/ostree-sysroot-deploy.c